package sctu.edu.java.year2016.team05.lizixin.day20160602.chapter9_2;

/**
 * Created by home on 2016/6/2.
 * 编写java程序，创建一个类，在该类中定义一个方法，并在方法内部创建一个局部内部类，通过局部内部类求任意两个数的乘积，并在外部类中测试
 */

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.Scanner;

public class OneAnimal {
    public void Method(int a, int b) {
        System.out.println("两个数的乘积是：");
        class OneInner {
            public int ChengJi(int a, int b) {

                return a * b;
            }


        }
        OneInner T = new OneInner();
        T.ChengJi(a, b);
        System.out.println(T.ChengJi(a, b));


    }


    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请输入a的值");
        int a = input.nextInt();
        System.out.println("请输入b的值");
        int b = input.nextInt();
        OneAnimal d = new OneAnimal();
        d.Method(a, b);


    }


}
